package com.zzqstart.cateservice.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.util.Date;

import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author testjava
 * @since 2023-03-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="CateRecipe对象", description="")
public class CateRecipe implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "菜谱ID")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "菜谱一级分类编号")
    private String categoryParentId;

    @ApiModelProperty(value = "菜谱二级分类编号")
    private String categoryId;

    @ApiModelProperty(value = "菜谱标题")
    private String title;

    @ApiModelProperty(value = "菜谱评分")
    private BigDecimal grade ;

    @ApiModelProperty(value = "发布者ID")
    private String publisherId;

    @ApiModelProperty(value = "菜谱主图")
    private String mainImgUrl;

    @ApiModelProperty(value = "收藏数量")
    private Integer collectCount;

    @ApiModelProperty(value = "菜谱状态：1，删除；；0，正常")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty(value = "菜谱状态：；1，打回；0，正常")
    private Integer isReturn;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "评分人数")
    private Integer gradeCount;
}
